package com.cos.openapi.entity;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class Menu implements Serializable {
    private Integer id;

    private String name;

    private Integer parentId;

    private String url;

    private String icon;

    private String perms;

    private Short type;

    private Integer sort;
    //处理多级菜单   new  出来后会有内存地址唯一
    private List<Menu> children=new ArrayList<>();

    private static final long serialVersionUID = 1L;

    public Menu(Integer id, String name, Integer parentId, String url, String icon, String perms, Short type, Integer sort) {
        this.id = id;
        this.name = name;
        this.parentId = parentId;
        this.url = url;
        this.icon = icon;
        this.perms = perms;
        this.type = type;
        this.sort = sort;
    }

    public Menu() {
        super();
    }

}